<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>小米水平导航栏</title>
    <style>
      ul {
        list-style: none;
        background-color: skyblue;
      }

      ul li {
        display: inline-block;
      }

      ul li a {
        display: inline-block;
        text-decoration: none;
        color: #fff;
        padding: 10px 15px;
      }

      ul li a:hover {
        font-weight: bolder;
        background-color: aquamarine;
      }
    </style>
  </head>
  <body>
    <ul class="topbar">
      <li><a href="#">选项1</a></li>
      <li><a href="#">选项2</a></li>
      <li><a href="#">选项3</a></li>
      <li><a href="#">选项4</a></li>
      <li><a href="#">选项555555555555555555555555555555555</a></li>
    </ul>
  </body>
</html>
